<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>图书管理</title>
<link type="text/css" rel="stylesheet" href="/static/css/style.css" >
</head>
<body>
	
	<div id="header">
			<span class="wel_word">图书管理系统</span>
			<div>
				<a href="http://localhost:8080">返回商城</a>
			</div>
	</div>
	
	<div id="main">
		<table>
			<tr>
				<td>名称</td>
				<td>价格</td>
				<td>作者</td>
				<td>销量</td>
				<td>库存</td>
				<td colspan="2">操作</td>
			</tr>		
			<tr th:each="book:${books}">
				<td th:text="${book.name}">${}</td>
				<td th:text="${book.price}">${}</td>
				<td th:text="${book.author}">${}</td>
				<td th:text="${book.sales}">${}</td>
				<td th:text="${book.stock}">${}</td>
				<td><a href="http://localhost:8080/editBook?id=${}" th:text="${book.id}">修改</a></td>
				<td><a href="http://localhost:8080/deleteBook?id=${}" th:text="${book.id}">删除</a></td>
			</tr>
			
			<tr>
				<td></td>
				<td></td>
				<td></td>
				<td></td>
				<td></td>
				<td></td>
				<td><a href="http://localhost:8080/editBook?id=-1">添加图书</a></td>
			</tr>	
		</table>
	</div>
</body>
</html>